curl --request POST \
--url http:///%7B{baseurl}%7D/api/v1/management/attribute-classes \
--header 'Content-Type: application/json' \
--header 'x-api-key: <x-api-key>' \
--data '{
"environmentId": "{{environmentId}}",
"name": "My new Attribute",
"type": "code"
}'
{
"data": {
"archived": false,
"createdAt": "2024-04-23T11:21:38.155Z",
"description": null,
"environmentId": "clurwouax000azffxt7n5unn3",
"id": "clvcapx7v0000xz1zskcgf5k0",
"name": "My new Attribute",
"type": "code",
"updatedAt": "2024-04-23T11:21:38.155Z"
}
}
Create a new Attribute Class by passing in its type as well as the name! Now just use them in your app and pass this value with a user & it’ll be associated with it.
curl --request POST \
--url http:///%7B{baseurl}%7D/api/v1/management/attribute-classes \
--header 'Content-Type: application/json' \
--header 'x-api-key: <x-api-key>' \
--data '{
"environmentId": "{{environmentId}}",
"name": "My new Attribute",
"type": "code"
}'
{
"data": {
"archived": false,
"createdAt": "2024-04-23T11:21:38.155Z",
"description": null,
"environmentId": "clurwouax000azffxt7n5unn3",
"id": "clvcapx7v0000xz1zskcgf5k0",
"name": "My new Attribute",
"type": "code",
"updatedAt": "2024-04-23T11:21:38.155Z"
}
}
OK
The response is of type object
.
Was this page helpful?